// ext5_8.cpp -- count the words.
#include <iostream>
#include <cstring>

const int MaxSize = 100;
int main(void)
{
	using std::cout;
	using std::cin;
	using std::endl;
	
	int count = 0;
	char words[MaxSize];
	
	cout << "Enter some words:\n";
	while(1)
	{
		cin >> words;
		if (!strcmp(words, "done"))
		{
			break;
		}
	
		count++;
	}
	
	cout << "You entered a total of "<< count << " words."<< endl;
}

